<script>
	const classfly = function(list, callback){
		const ret = [];
		for(const data of list){
			const condition = callback(data);
			let obj = ret.find(item=>JSON.stringify(item.condition) === JSON.stringify(condition))
			if(!obj){
				ret.push(obj = { condition, list:[] });
			}
			obj.list.push(data);
		}
		return ret;
	}
	const data = [
		{ A:100, B:100, C:100 },
		{ A:100, B:100, C:200 },
		{ A:100, B:200, C:100 },
		{ A:100, B:200, C:200 },
		{ A:200, B:100, C:100 },
		{ A:200, B:100, C:200 },
	]
	const res = classfly(data,({A,B})=>({A,B}))
	console.log(res)
	const res2 = classfly(data,({A,B,C})=>([A,B,C]))
	console.log(res2)
</script>